Thanks for the help. That did solve it for running it myself but the python script still failed. I get
/opt/retropie/configs/all/autostart.sh: line 1: 3353 Terminated emulationstation
tput: unknown terminal "unknown"
'unknown': I need something more specific.
Error opening terminal: unknown.
Traceback (most recent call last):
File "/opt/retropie/supplementary/runcommand/joy2key.py", line 42, in <module>
curses.setupterm()
_curses.error: setupterm: could not find terminal
Then emulationstation proceeds to launch again.
In the end I got everything working by going back to RetroPie v4.0.2. I really do not care about having the latest version for this one as it is more of a novelty item than anything since I can launch games with cartridges.